<template>
  <div class="all_league">
    <div class="all_header">
      <div class="AlibabaPuHuiTi_2_85_ title">{{languageJson.home.allleague}}</div>
      <el-button class="all_button AlibabaPuHuiTi_2_55_" @click="homeStore.clickallleague()">{{languageJson.home.all}}</el-button>
    </div>
    <div class="all_content" v-loading="homeState.allleague.loading">
      <el-scrollbar height="100%" always>
        <div style="padding: 0 12px">
          <el-collapse class="league_collapse" v-model="homeState.allleague.collapse">
            <CollapseItem v-for="item in homeState.allleague.data" :key="item.country_id" :data="item" />
          </el-collapse>
        </div>
      </el-scrollbar>
    </div>
  </div>
</template>

<script setup>
import { inject } from 'vue'
import CollapseItem from './CollapseItem.vue'
const collapse = ref([])

const { homeStore, homeState } = inject('HomeStore')
const languageJson = inject('languageJson')
</script>

<style lang="scss" scoped>
.all_league {
  height: calc(100% - 196px);
  margin-top: 8px;
  background: #fff;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
}
.all_header {
  margin: 0 12px 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.title {
  font-size: 16px;
  font-weight: bold;
  color: #000;
}
.all_content {
  height: calc(100% - 38px);
}
.all_button {
  border-radius: 0;
  height: 24px;
  font-size: 12px;
  background-color: var(--pcmain-color);
  color: #fff;
  border-color: var(--pcmain-color);
}
</style>

<style>
.league_collapse {
  border: none;
}
</style>